function Get-ExistingAzureServerName {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $true)][string[]]$ExistingServers,
        [Parameter(Mandatory = $false)][string]$ServerName,
        [Parameter(Mandatory = $false)][bool]$ConfirmAll = $false
    )

    # Allow user to use existing value or to update it.
    if ((Confirm-SingleValue -Description 'Azure SQL Server name' -Value $ServerName -ConfirmAll $ConfirmAll) -eq $true) { return $ServerName }

    # Ask user.
    Write-Host # Newline.
    $params = @{
        Question = 'Which existing Azure SQL Server do you choose'
        Options = $ExistingServers
    }
    $ServerName = Open-LSQuestion @params

    return $ServerName
}